#pragma once
#include "stdafx.h"
#include "vector"
#include "sstream"
#include "string"
using namespace std;

const wstring keywordsFunc = L"proc";
const wstring keywordsFuncB = L"PROC";

const wstring keywordsByte = L"db";
const wstring keywordsByteB = L"DB";

const wstring keywordsDWord = L"dw"; 
const wstring keywordsDWordB = L"DW"; 


class Data{
public:
	wstring m_strDataName;
	wstring m_strDataType;
};

enum ERROR_CODE_ANALYSE{
	ANA_FAIL,
	ANA_SUCCEED,
	ANA_GRAMMER_ERR,
};


class CodeAnalyser
{
public:
	CodeAnalyser(void);
	CodeAnalyser(const WCHAR* pCode);
	virtual ~CodeAnalyser(void);
	
	ERROR_CODE_ANALYSE Analyse();

	vector<wstring>& GetFunc(){
		return m_vecFuncNames;
	}

	vector<Data>& GetData(){
		return m_vecData;
	}
private:
	const WCHAR *m_pCode;

	vector<wstring> m_vecFuncNames;
	vector<Data> m_vecData;
};
